#ifndef APLAYER_H
#define APLAYER_H

#include <QMediaPlayer>
#include <QMediaPlaylist>
#include <QMap>

class APlayer : public QMediaPlayer
{
public:
	APlayer();
	~APlayer();
	void			stopNow(bool release);
	bool 			setNow(const std::string& path);
	void			setLoop(bool loop);
	bool 			add(const std::string& path);
private:
	int			sid(const std::string& path);
	QMap<std::string, int>	m_map;
	QMediaPlaylist			m_plist;
	std::string			m_now;
};

#endif // APLAYER_H
